import { createStore } from 'vuex'
import persisted from 'vuex-persistedstate'
export default createStore({
  state: {
    userInfo: {}
  },
  mutations: {
    saveUserInfo(state, val) {
      state.userInfo = val
    }
  },
  actions: {
  },
  modules: {
  },

  plugins: [
    persisted({
      reducer(state) {
        return {
          userInfo: state.userInfo
        }
      }
    })
  ]
})
